CLS
RANDOMIZE TIMER
n = 20
m = 8
DIM a(n), b(m)
FOR i = 1 TO n
a(i) = FIX(RND * 8 + 9)
NEXT
FOR i = 1 TO n
r = m
FOR j = 1 TO 8
r = r + 1
IF a(i) = r THEN b(j) = b(j) + 1
NEXT
NEXT
PRINT "massiv"
FOR i = 1 TO n
PRINT a(i);
NEXT
PRINT "kolichestvo elementov ravnih 9,10,11...16"
FOR i = 1 TO m
PRINT b(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )